<!DOCTYPE html>
<html>
<head>
<title>QQ扫码支付 - {:sysconf('site_name')}</title>
{include file="head"}
<link href="/static/thinkct/css/basic.css?v=1" rel="stylesheet" type="text/css" /><script language="javascript" src="/static/thinkct/js/jquery.m.js"></script><script language="javascript" src="/static/thinkct/js/layui/layui.js"></script><script language="javascript" src="/static/thinkct/js/common.js?v=1"></script><script type="text/javascript">
function CloseWebPage() {
	if (navigator.userAgent.indexOf("MSIE") > 0) {
		if (navigator.userAgent.indexOf("MSIE 6.0") > 0) {
			window.opener = null;
			window.close()
		} else {
			window.open('', '_top');
			window.top.close()
		}
	} else if (navigator.userAgent.indexOf("Firefox") > 0) {
		window.location.href = 'about:blank '
	} else {
		window.opener = null;
		window.open('', '_self', '');
		window.close()
	}
}
$(function() {
	var i = 596 ;
	var v = 0;
	var countdown = null;

	function timeShow() {
		i--;
		$("#time_tisp").html("（请在 " + i + " 秒 内完成支付，否则订单失效，需返回重新提交）");
		if (i < 1) {
			clearInterval(countdown);
			$('#time_tisp').html("（<font color=red>订单已失效，请返回重新提交</font>）");
			layer.alert("<strong>订单已失效，请返回重新提交</strong>", {
				icon: 5
			}, function() {
				CloseWebPage()
			})
		} else if (v == 5) {
			Polling();
			v = 0
		} else {
			v++
		}
	};
	countdown = setInterval(timeShow, 1000);

	function Polling() {
		$.ajax({
			type: "POST",
			dataType: "json",
			url: "/member/pay/Pquery",
			data: {
				number: '{$bh}',
				type: 'qpay'
			},
			success: function(datas) {
				if (datas.state != -1) {
					clearInterval(countdown)
				}
				if (datas.state == 1) {
					var ing = layer.load('loading...');
					setTimeout("location.href='" + datas.url + "'", 1000)
				} else if (datas.url) {
					location.href = datas.url
				}
			}
		})
	}
})

</script>
<style type="text/css">
html{overflow-x:hidden;overflow-y:scroll;*background-image:url(about:blank);*background-attachment:fixed;} 
body{color:#333;font:12px/1.4 '\5FAE\8F6F\96C5\9ED1',microsoft yahei,"宋体",Arial,sans-serif;background:#fff;}
li{list-style:none;}
*{margin:0;padding:0;}
.qr_top{background:#f2f2f2;line-height:45px;height:45px;width: 80%;margin: 40px auto 0 auto;border:#ccc solid 1px;border-bottom:0;}
.qr_top li{float:left;width:62%;color:#333;padding-left:20px;}
.qr_top b{font-size:18px;color:#ff6600;}
.qr_top a{font-size:16px;color:#333;text-decoration:none;}
.qr_info{border:#e4e4e4 solid 1px;border-top:#ccc solid 1px;text-align:center;padding:40px 0;width: 80%;margin: 0px auto;}
.qr_info .box{width:670px;display:inline-block; }
.qr_info .box div{width:670px;height:420px;text-align:left;zoom:1;display:inline-block;  *display:inline;background: url("/static/thinkct/image/qrpay_qpay.png") no-repeat}
.qr_info .box cite{float:left;display:inline;margin:20px 0 0 4px;border:#ddd solid 1px;text-align:center;width:298px;height:298px;overflow:hidden;}
.qr_info .box cite .mainIframe{margin-left:24px;margin-top:24px}
.qr_info .links{width: 670px;display:inline-block;text-align:left;}
.qr_info .links span{width:300px;display:inline-block;text-align:center;}
.qr_info .links a{color:#c0c0c0;}
.qr_info .links a:hover{color:#666;}
</style>
</head>
<body>
	<div class='qr_top'>
		<li><strong><a href="{:sysconf('site_domain')}"  target="_blank">{:sysconf('site_name')}{$name}</a></strong><font color="#999999"><span id="time_tisp"></span></font></li>
		<li style="float:right;text-align:right;width:32%;padding:0 20px 0 0;">支付订单：{$bh}&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b>{$money}</b> 元</li>
	</div>
	<div class='qr_info'>
		<div class="box">
			<div>
				<cite><iframe id="mainIframe" class="mainIframe" name="mainIframe" src="/member/pay/qpayForm/online_qpay" style="height:274px;height:274px" frameborder="0" scrolling="no" ></iframe>
				</cite>
			</div>
				<!--span class='links'><span><a href='/member/pay/qpayForm/online_qpay/pc'>前往支付宝PC端支付</a></span></span-->
		</div>
	</div>
	<div class='qr_s'>
	<div>
</body>
</html>